package com.zhx.ad.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.zhx.ad.enums.CommonStatus;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.util.Date;

/**
 *describe: 
 *
 *@author zhanghaixuan
 *@date 2019/02/02
 **/
@Data
@EqualsAndHashCode(callSuper = false)
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
@TableName("ad_unit")
public class AdUnit extends Model<AdUnit> {

	@TableId(value = "id", type = IdType.ID_WORKER_STR)
	private String id;

	private String planId;

	private String unitName;

	private Long positionType;

	private Integer unitStatus;

	private Integer budget;

	private Date createTime;

	private Date updateTime;


	public AdUnit(String planId,String unitName,Integer budget,Long positionType){
		this.planId = planId;
		this.unitName = unitName;
		this.budget = budget;
		this.unitStatus = CommonStatus.VALID.getStstus();
		this.positionType = positionType;
		this.createTime = new Date();
		this.updateTime = this.createTime;
	}


}
